(function () {
    'use strict';
    angular.module('BlurAdmin.pages.user', []).config(routeConfig);
    /** @ngInject */ function routeConfig($stateProvider) {
        $stateProvider.state('user', {
            resolve:{
                promiseObj:  function(UserService){
                    // $http returns a promise for the url data
                    return UserService.fetchAllUsers();
                },
            },
            url: '/user',
            templateUrl: 'app/pages/user/user.html',
            title: 'User Center',
            controller: 'UserPageCtrl',
            sidebarMeta: {order: 800, icon: 'ion-ios-people-outline',},
        });
    }
})();